#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

#if 1
int main() 
{
    char arr[100] = "0";
    char del[100] = "0";

    gets(arr);
    gets(del);


    int i = 0;
    int j = 0;
    for (i = 0; del[i] != '\0'; i++)
    {

        for (j = 0; arr[j] != '\0'; j++)
        {
            if (arr[j] == del[i])
            {
                arr[j] = '5';
            }
        }
        j = 0;
    }

    for (int k = 0; arr[k] != '\0'; k++)
    {
        if (arr[k] != '5')
        {
            printf("%c", arr[k]);
        }
    }
    return 0;
    
}
#endif
